package com.aaa.doctor.controller.api;

import com.aaa.doctor.feign.check.CheckItemFeign;
import com.aaa.entity.CheckItem;
import com.aaa.vo.MedicinalVo;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MuChengGuo
 * @date 2023/4/2 17:47
 * Description: TODO
 **/
@RestController
@RequestMapping("doctor/check")
public class CheckApiController {

    @Autowired
    private CheckItemFeign checkItemFeign;

    @ApiOperation(value = "查询所有药品")
    @PostMapping("listCheckItemForPage")
    public Result<IPage<CheckItem>> listCheckItemForPage(@RequestBody MedicinalVo medicinalVo) {
        IPage<CheckItem> checkItemPage = checkItemFeign.listCheckItemForPage(medicinalVo);
        return new Result<>(2000, "成功", checkItemPage);
    }

}
